<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>商品上架</title>
    <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/layui/2.6.8/css/layui.css">
    <script src="https://cdn.bootcdn.net/ajax/libs/layui/2.6.8/layui.js"></script>
    <script>
        layui.use('layedit', function(){
            var layedit = layui.layedit;
            var index = layedit.build('editor', {
                tool: [
                    'strong', 'italic', 'underline', 'del', '|', 'left', 'center', 'right', 'link', 'unlink', 'face', '|', 'color', 'font'
                ]
            });
        });
    </script>
    <style>
        body {
            background-color: #f5f5f5;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            margin: 0;
            padding: 0;
        }
        .layui-header, .layui-footer {
            background-color: #303030;
            color: #fff;
            padding: 0 15px;
        }
        .layui-header .layui-logo {
            font-size: 24px;
            line-height: 60px;
            margin-right: 30px;
        }
        .layui-side, .layui-layout-admin .layui-body, .layui-footer {
            background-color: #f5f5f5;
            color: #333;
        }
        .layui-card-header {
            background-color: #303030;
            color: #fff;
        }
        .layui-card-body {
            background-color: #fff;
            color: #333;
        }
        .layui-layout-admin .layui-body {
            padding: 15px;
        }
        .layui-side {
            background-color: #333;
            flex-shrink: 0;
        }
        .layui-side-scroll {
            height: 100%;
            overflow: auto;
        }
    </style>
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <%-- 头部导航 --%>
    <div class="layui-header">
        <jsp:include page="header.jsp" />
    </div>

    <%-- 侧边栏 --%>
    <div class="layui-side">
        <jsp:include page="side.jsp" />
    </div>

    <%-- 主体内容区 --%>
    <div class="layui-body">
        <div class="layui-container">
            <div class="layui-row layui-col-space20">
                <div class="layui-col-md8">
                    <div class="layui-card">

                        <div class="layui-card-header">商品信息</div>
                        <div class="layui-card-body">
                            <form class="layui-form" action="../../GoodsAddServlet.do" method="post" enctype="multipart/form-data">
                                <%-- 添加隐藏的 user_id 字段 --%>
                                <input type="hidden" name="user_id" value="${user.user_id}"/>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">商品名称</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="goods_info" required lay-verify="required" placeholder="请输入商品名称" autocomplete="off" class="layui-input">
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label class="layui-form-label">商品类别</label>
                                    <div class="layui-input-block">
                                        <select name="goods_category" lay-verify="required" lay-search>
                                            <option value="">请选择商品类别</option>
                                            <option value="服装">服装</option>
                                            <option value="食品">食品</option>
                                            <option value="汽车">汽车</option>
                                            <option value="电器">电器</option>
                                            <option value="手表">手表</option>
                                            <option value="电脑">电脑</option>
                                        </select>

                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label class="layui-form-label">描述图片</label>
                                    <div class="layui-input-block">
                                        <input type="file" name="goods_image" class="layui-input">
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label class="layui-form-label">价格</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="goods_price" required lay-verify="required" placeholder="请输入商品价格-RMB" autocomplete="off" class="layui-input">
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <div class="layui-input-block">
                                        <button class="layui-btn" lay-submit lay-filter="formDemo">提交</button>
                                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>


            </div>
        </div>
    </div>

    <%-- 底部版权信息 --%>
    <div class="layui-footer">
        © 商品发布系统 - 版权所有
    </div>
</div>
</body>
</html>
